<template>
  <div class="loading">
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
  </div>
</template>

<style lang="less" scoped>
.loading {
  height: 40px;
  margin: 100px auto;
  text-align: center;
  span {
    width: 8px;
    height: 100%;
    border-radius: 4px;
    background: lightgreen;
    animation: load 1s ease infinite;
    margin: 0 2px;
    display: inline-block;
    &:nth-child(2) {
      animation-delay: 0.2s;
    }
    &:nth-child(3) {
      animation-delay: 0.4s;
    }
    &:nth-child(4) {
      animation-delay: 0.6s;
    }
    &:nth-child(5) {
      animation-delay: 0.8s;
    }
  }
}

@keyframes load {
  0%,
  100% {
    transform: scaleY(1.5);
    background: lightgreen;
  }
  50% {
    transform: scaleY(1);
    background: lightblue;
  }
}
</style>
